package tests;

import junit.framework.Assert;
import junit.framework.TestCase;
import laboratoryQ.experiment.settings.BaseValidateAble;


public class TestExperimentsSupport extends TestCase {
	public static class FakeSettings extends BaseValidateAble {
		public int int1 = -1;
		public int[] intarr1 = new int[0];
		public String str1 = null;
		public String str2 = "";
		public boolean b1 = false;
	}
	
	public void testBaseValidateAble() {
		FakeSettings settings = new FakeSettings();
		settings.initialise();
		settings.int1 = 1;
		settings.intarr1 = null;
		settings.str1 = "Str";
		RuntimeException e = null;
		try {
			settings.validate();
		} catch (RuntimeException exc) {
			e = exc;
		}
		Assert.assertNotNull(e);
		settings.str2 = "pam param";
		settings.validate();
	}
}
